﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Projet_WPF.DataAccess
{
    class Observation
    {
        public bool AddObservation(int idPatient, Model.Observation obs)
        {
            try
            {
                ServiceObservation.ServiceObservationClient service = new ServiceObservation.ServiceObservationClient();

                ServiceObservation.Observation observation = new ServiceObservation.Observation();

                observation.Date = obs.Date;
                observation.Comment = obs.Comment;
                observation.Prescription = obs.Prescription;
                observation.Pictures = obs.Pictures;
                observation.Weight = obs.Weight;
                observation.BloodPressure = obs.BloodPressure;

                return service.AddObservation(idPatient, observation);
            }
            catch (Exception)
            {
                return false;
            }
        }
    }
}
